/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ultrasoft.farmasoft.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Administrador
 */
@Embeddable
public class SubmenuproviderPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "menuProviderId")
    private short menuProviderId;
    @Basic(optional = false)
    @Column(name = "submenuProviderId")
    private short submenuProviderId;

    public SubmenuproviderPK() {
    }

    public SubmenuproviderPK(short menuProviderId, short submenuProviderId) {
        this.menuProviderId = menuProviderId;
        this.submenuProviderId = submenuProviderId;
    }

    public short getMenuProviderId() {
        return menuProviderId;
    }

    public void setMenuProviderId(short menuProviderId) {
        this.menuProviderId = menuProviderId;
    }

    public short getSubmenuProviderId() {
        return submenuProviderId;
    }

    public void setSubmenuProviderId(short submenuProviderId) {
        this.submenuProviderId = submenuProviderId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) menuProviderId;
        hash += (int) submenuProviderId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SubmenuproviderPK)) {
            return false;
        }
        SubmenuproviderPK other = (SubmenuproviderPK) object;
        if (this.menuProviderId != other.menuProviderId) {
            return false;
        }
        if (this.submenuProviderId != other.submenuProviderId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ultrasoft.farmasoft.domain.SubmenuproviderPK[ menuProviderId=" + menuProviderId + ", submenuProviderId=" + submenuProviderId + " ]";
    }
    
}
